* image.c: Shrink memory needed for animation cache.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 20:47:27 +0000 (13:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2013 20:47:27 +0000 (13:47 -0700)
commit8df5b5c6e16cbafd2c8d39c42035c48386b30302
tree9f91b816f47032107d19ab7ca0bbecf12f0c09da
parent6b0857cb377ff570ed4b07bd4338102a4b6e7025
* image.c: Shrink memory needed for animation cache.

(SIGNATURE_DIGESTSIZE): New constant.
(struct animation_cache): Make 'signature' a fixed size array of bytes.
(imagemagick_create_cache): Copy the signature.  This saves
several KB of memory that ImageMagick wastes per signature.
Don't bother updating the update_time, as the caller does that now.
(imagemagick_prune_animation_cache): Don't destroy the signature, as
it's a fixed size struct member now.
(imagemagick_get_animation_cache): Always destroy the signature,
as it's now imagemagick_create_cache's responsibility to copy it.
Avoid duplicate calls to strcmp and to imagemagick_create_cache,
and use memcmp rather than strcmp.
eassert that ImageMagick returns a signature of the specified length.
src/ChangeLog
src/image.c